#ifndef GY_BASEDELEGATEWIDGET_H
#define GY_BASEDELEGATEWIDGET_H

#include <QDebug>
#include <QObject>
#include <QWidget>
#include <QVariant>
#include <QHBoxLayout>

#include "GY_ControlLibrary_global.h"

class GY_CONTROLLIBRARY_EXPORT GY_BaseDelegateWidget : public QWidget
{
    Q_OBJECT

public:
    explicit GY_BaseDelegateWidget(QWidget *parent = nullptr);
    ///
    /// \brief setData 设置传入窗口结构体
    /// \param val 结构体数据
    ///
    virtual void setData(const QVariant &val) = 0;
    ///
    /// \brief getData 获取经过窗口设置过的结构体
    /// \return 结构体数据
    ///
    virtual QVariant getData() = 0;
    ///
    /// \brief getText 获取显示文本
    /// \return
    ///
    virtual QString getText() = 0;
    ///
    /// \brief setRowColumn 设置行列数
    /// \param row 行
    /// \param colunm 列
    ///
    void setRowColumn(QVariant rowId, int colunm);

protected:
    QHBoxLayout* m_pLayout = nullptr;
    QVariant m_RowId = -1;
    int m_Column = -1;

signals:

};

#endif // GY_BASEDELEGATEWIDGET_H
